package com.boot.consumer.demo.consumer;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

import javax.jms.TextMessage;

@Component
public class QueueConsumer {

    @JmsListener(destination = "${myqueue}")
    public void receive(TextMessage text) throws Exception {
        System.out.println("消费者收到信息" + text.getText());

    }
}
